/*
 * ImageContainer.h
 *
 *  Created on: 28/07/2011
 *      Author: solnox
 */

#ifndef IMAGECONTAINER_H_
#define IMAGECONTAINER_H_
#include <string>
#include <vector>
#include <list>
#include "opencv2/opencv.hpp"


class ImageContainer {
public:
	ImageContainer();
	virtual ~ImageContainer();
	bool loadImages(std::string path_name, std::string file_ending);
	cv::Mat * getNextImage();
	std::string getNextImageName();
	cv::Mat * getLastImage();
	std::vector<cv::Mat*> getAllImages();

	std::vector<std::string> getAllImageNames(){return input_image_names_;}

private:
	int getFiles(std::string dir, std::list<std::string> &files , std::string file_ending=0);
	bool endingEquals(std::string query_name, std::string ending);
	void sortNames( std::list<std::string> &names);
	std::vector<cv::Mat*> input_images_;
	std::vector<std::string> input_image_names_;
	unsigned int image_ctr_;
};

#endif /* IMAGECONTAINER_H_ */
